package com.scalar.chiptrack.sales.forms;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.scalar.chiptrack.ChipTrackActionForm;

/**
 * @author Prabhanjan Kumar .V
 * @version $Revision: 1.3 $ $Date: 2008/08/04 11:01:14 $
 */




public final class SplitSalesOrderForm  extends ChipTrackActionForm  {


    // --------------------------------------------------- Instance Variables






    private String lineItemId[];
    private String lineItemNo[];
    private String salesOrderId;
    private String salesOrderNo;
    private String customerName;
    private String status;
    private int customerId;

    private String qtyToSplit[];



    // ----------------------------------------------------------- Properties



    public String[] getLineItemId ()
    {
        return lineItemId;
    }

    public void setLineItemId ( String[] lineItemId )
    {
        this.lineItemId = lineItemId;
    }

    public String[] getLineItemNo ()
    {
        return lineItemNo;
    }

    public void setLineItemNo ( String[] lineItemNo )
    {
        this.lineItemNo = lineItemNo;
    }

    public String getSalesOrderId ()
    {
        return salesOrderId;
    }

    public void setSalesOrderId ( String salesOrderId )
    {
        this.salesOrderId = salesOrderId;
    }

    public String getSalesOrderNo ()
    {
        return salesOrderNo;
    }

    public void setSalesOrderNo ( String salesOrderNo )
    {
        this.salesOrderNo = salesOrderNo;
    }

    public String[] getQtyToSplit ()
    {
        return qtyToSplit;
    }

    public void setQtyToSplit ( String[] qtyToSplit )
    {
        this.qtyToSplit = qtyToSplit;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    // --------------------------------------------------------- Public Methods


    /**
     * Reset all properties to their default values.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {



    }


    /**
     * Validate the properties that have been set from this HTTP request,
     * and return an <code>ActionErrors</code> object that encapsulates any
     * validation errors that have been found.  If no errors are found, return
     * <code>null</code> or an <code>ActionErrors</code> object with no
     * recorded error messages.
     *
     * @param mapping The mapping used to select this instance
     * @param request The servlet request we are processing
     */
    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();

        //if ((vendorName == null) || (vendorName.length() < 1))
        //    errors.add("Vendor", new ActionError("error.vendor name.required"));

        return errors;

    }


    public int getCustomerId() {
        return customerId;
    }

    public void setCustomerId(int customerId) {
        this.customerId = customerId;
    }
}
